﻿using System;
using System.Collections.Generic;
using Sustainalytics.Entities.ESGRatings;
using Sustainalytics.Utils;

namespace Sustainalytics.ESGRatings.BusinessLogic.ESGProfile
{
    public interface IESGProfileManagement
    {
        List<Entities.ESGRatings.ESGProfile> LoadESGProfiles(Guid? accountId);

        List<Entities.ESGRatings.ESGProfile> LoadESGProfiles(IEnumerable<Guid> accountIds);

        List<Entities.ESGRatings.ESGProfile> LoadESGProfiles(Guid? accountId, ListOptions options);

        Entities.ESGRatings.ESGProfile LoadESGProfileForAccount(Guid? accountId, Guid esgProfileId);

        Entities.ESGRatings.ESGProfile LoadESGProfile(Guid esgProfileId);

        Entities.ESGRatings.ESGProfile LoadESGProfileActiveState(Guid? accountId);
        
        Entities.ESGRatings.ESGProfile LoadESGProfileSuggestedState(Guid? accountId);

        int CountESGProfilesNumber(Guid? accountId);

        Entities.ESGRatings.ESGProfile AssureEsgProfile();

        void CreateESGProfile(Entities.ESGRatings.ESGProfile esgProfileEntity);

        void UpdateESGProfile(Guid? accountId, Guid esgProfileId, Entities.ESGRatings.ESGProfile esgProfileToUpdate);

        void DeleteESGProfileForAccount(Guid? accountId, Guid esgProfileId);

        void DeleteDefaultESGProfile(Guid? accountId, Guid esgProfileId);

        void DeleteAllESGProfilesForAccount(Guid? accountId);

        void DeleteESGProfile(Guid esgProfileId);

        void DeleteAllIactiveESGProfilesForAccount(Guid? accountId, ActiveTypeEnum activeState);

        bool QueryExistentProfileActive(Guid? accountId);

        Entities.ESGRatings.ESGProfile LoadDefaultEsgProfile();

        void ReplaceActiveProfileOfAccount(Guid accountId, Guid currentEsgProfile, Guid? upcomingEsgProfile);

        bool FindEsgProfileNameDuplicate(string newEsgProfileName, Guid esgProfileId);
    }
}
